package com.jeewms.www.tms.util;
/**
*检查是否快速点击
*@author qiancheng
*creat by 2019/8/22 18:12
**/
public class ClickUtil {
    private static long mLastClickTime;

    /**
     * 判断当前点击现象是否是快速的点击，若是的则返回true，在客户端中要屏蔽这种现象。
     *
     * @return
     */
    public synchronized static boolean isFastClick() {
        long time = System.currentTimeMillis();
        long deltaTime = time - mLastClickTime;
        if (0 < deltaTime && deltaTime < 800) {
            return true;
        }
        mLastClickTime = time;

        return false;
    }
}
